<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        .box{
            border-bottom: #afb9ae 1px solid;
            border-top: 3px solid #a7d790;
            width: 100%;
            height: 40px;
            overflow: hidden;

        }
        .d1,.d2,.d3,.d4{
            color: #000;
            display: inline-block;
            width: 80px;
            height: 40px;
            text-decoration: none;
            line-height: 40px;
            text-align: center;
        
        }
        a:hover{
            color: #c8de1e;
            background-color: #afb9ae;
        }
    </style>
</head>
<body>
    <div class="box">
        <a href="#" class="d1">导航1</a>
        <a href="#" class="d2">导航2</a>
        <a href="#" class="d3">导航3</a>
        <a href="#" class="d4">导航4</a>        
    </div>
</body>
</html>